//定义store
import { defineStore } from 'pinia'
import { ref } from 'vue';

const adminInfoStore = defineStore('userInfo',()=>{
    //定义状态相关的内容
    const info = ref({})

    const setInfo = (newInfo) => {
        info.value = newInfo
    }

    //3.移出token的值
    const removeInfo = () => {
        info.value = {}
    }

    return {
        info, setInfo, removeInfo
    }


},{persist:true})

export default adminInfoStore;
